package com.itheima.datastructure;

/**
 * Leetcode 很多链表题目用到的节点类
 */
public class ListNode {
    public int val;
    public ListNode next;

    public ListNode(int val,ListNode next){
        this.val = val;
        this.next = next;
    }

    @Override
    public String toString() {
        return "ListNode{" +
                "val=" + val +
                ", next=" + next +
                '}';
    }



}
